<?php
session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="batdongsan, bat dong san, diaoc, dia oc, muaban, giao dich, giaodich, ban, mua, thue, chothue, cho thue" />
<meta name="Description" content="Được phát triển bởi Công ty TNHH Tin Học Phan Nguyễn - Phan Nguyen Informatics Co., Ltd. - phannguyenit.com" />
<?php
if (!isset($_SESSION['lang']))
	$_SESSION['lang'] = "vn";
if (isset($_GET['lang']))
	$_SESSION['lang'] = $_GET['lang'];
$lang=$_SESSION['lang'];
?>
<?php
define("_ALLOW",1);
include("config.php");
?>
<?php
	$dientich = -1;
	$duongrong = -1;
	$huong = -1;
	$gia = -1;
	$keyword = "";
	if(isset($_GET['dientich']))
		$dientich = $_GET['dientich'];
	if(isset($_GET['duongrong']))
		$duongrong = $_GET['duongrong'];
	if(isset($_GET['keyword']))
		$keyword = $_GET['keyword'];
	if(isset($_GET['huong']))
		$huong = $_GET['huong'];	
	if(isset($_GET['gia']))
		$gia = $_GET['gia'];
?>
<title><?php echo $cfg_title_site; ?></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/stylemenu.css" rel="stylesheet" type="text/css">
<link href="css/stylemenu2.css" rel="stylesheet" type="text/css">
<link href="css/stylecontent.css" rel="stylesheet" type="text/css">
<link href="css/styleproduct.css" rel="stylesheet" type="text/css">
<link href="css/styleother.css" rel="stylesheet" type="text/css">
<link href="css/styleout.css" rel="stylesheet" type="text/css">
<link href="joomla/css/template_css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="editor/tinymce/jscripts/tiny_mce/plugins/media/jscripts/embed.js"></script>
<script language="javascript" src="common/js/ufo.js"></script>
<script language="javascript" src="common/js/vnexpress/Library.js"></script>
<script language="javascript" src="common/js/vnexpress/Vne.js"></script>


	


<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<body>
<script language="javascript">
var widthscreen = screen.width;
var heightscreen = screen.height;
var detailwin;
function openBox (winWidth, winHeight, scrollbars, toolbar, top, left, fileSrc, parent) {
	var newParameter = "width = " + winWidth + ", resizable = yes" + ", height = " + winHeight;
	newParameter += ", scrollbars = " + scrollbars + ",toolbar = " + toolbar + ", top = " + (heightscreen - winHeight)/2;
	newParameter += ",left = " + (widthscreen - winWidth)/2;
	detailwin = parent.open (fileSrc,"subWind",newParameter);
	detailwin.focus();
	return false;
};
</script>
<script language="javascript">
function checksearch (form) {
var strSearch, keyword;
	strSearch = form.keyword.value;
	strSearch = UnicodeGet(strSearch);
	keyword = UnicodeSet(strSearch);
	
	while (strSearch.length > 0 && strSearch.charAt(0) <= ' ')
	{
		strSearch = strSearch.substr(1);
	}

	while ((i=strSearch.length) > 0 && strSearch.charAt(i - 1) <= ' ')
	{
		strSearch = strSearch.substr(0, i - 1);
	}
	if (strSearch != "") {
		return true;
	}
	alert("Input keyword, please.");
	return false;
}
function CheckSubmitCart (form) {
	var quanlity = form.productquanlity;
	if (!checkunsignedInt(quanlity)) {
		alert("<?php if ($lang=="vn") echo "Vui lòng nhập số lượng"; else echo "Please input quantity"; ?>");
		return false;
	}
	return true;
}
function UFO_OutFlash (divid, urlfile, width, height) {
	var sdivid = "" + divid + "";
	var surlfile = "" + urlfile + "";
	var swidth = "" + width + "";
	var sheight = "" + height + "";
	var FO = {movie:surlfile, width:swidth, height:sheight, majorversion:"7", build:"0", bgcolor:"#ffffff", wmode:"transparent"};
	UFO.create(FO, sdivid);
}
</script>
<?php
include("configimage.php");
include("configdb.php");
include("class/dbconnect.php");
include("module.php");
include("class/cimage.php");
include("global.php");
if (isset($_GET['Itemid'])) $glb_Itemid = $_GET['Itemid'];
?>
<script language="javascript" src="common/js/checknumber.js"></script>
<script language="javascript" src="common/js/unicode.js"></script>
<script language="javascript" src="common/dhtml/dhtml.js"></script>
<!------------------------------JOOMLA-------------------------------//-->
<script language="javascript" src="joomla/js/joomla.javascript.js"></script>
<script language="javascript" src="joomla/js/JSCookMenu_mini.js"></script>
<script language="javascript" src="joomla/js/theme.js"></script>
<!------------------------------JOOMLA-------------------------------//-->
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1000" height="139">
      <param name="movie" value="flash/banner_1.swf">
      <param name="quality" value="high">
      <embed src="flash/banner_1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1000" height="139"></embed>
    </object></td>
  </tr>
  <tr>
  	<td style="background-image:url(images/bg_menu_top.jpg); background-repeat:repeat-x;" height="34">
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td style="background-image:url(images/bg_top_left.jpg); background-repeat:no-repeat;" height="34" width="15">
				</td>
				<td style="padding-left:120px;">
					<?php
						loadmenu2("top",1,"cmthememenutop","thememenutop");
					?>
				</td>
				<td style="background-image:url(images/bg_top_right.jpg); background-repeat:no-repeat;" height="34" width="15"></td>
			</tr>
		</table>
	</td>
  </tr>
  <tr><td height="5"></td></tr>
  <tr>
  	<td>
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td width="203" rowspan="2" valign="top">
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
					
					<!--DANG NHAP-->
						
						<tr>
							<td style="background-image:url(images/dangnhap2.jpg); background-repeat:repeat-y">
							<?php
								loadmodule("mod_users","","","");
							?>							</td>
						</tr>
						<tr>
							<td style="background-image:url(images/dangnhap3.jpg); background-repeat:no-repeat" height="9">							</td>
						</tr>
					<!--DANG NHAP-->
					
					<!--NHA BAN DAT BAN-->
					<tr>
						<td id="menuleft">
						<?php
							loadmenu2("left2",1,"cmthememenuleft","thememenuleft");
						?>						</td>
					</tr>
					<tr>
						<td style="background-image:url(images/bg_menuleft2.jpg)"></td>
					</tr>
					<tr>
						<td style="background-image:url(images/dangnhap3.jpg); background-repeat:no-repeat" height="9"></td>
					</tr>
					<!--NHA BAN DAT BAN-->
					<!--KHU VUC CHAO BAN-->
					<tr>					</tr>
					<!--KHU VUC CHAO BAN-->
					<tr>
						<td id="menuleft">
							<?php
								loadmenu2("left",1,"cmthememenuleft","thememenuleft");
							?>						</td>
					</tr>
					<tr>
						<td style="background-image:url(images/dangnhap3.jpg)" height="9"></td>
					</tr>
					<!--KHU VUC CHAO BAN-->
					<tr>
						<td >
							
			<script type="text/javascript" language="javascript" src="http://vnexpress.net/Service/Forex_Content.js"></script>			
<table width="100%" cellpadding="0" cellspacing="0">
  <tr>
  	<td style=" font-family:Tahoma; font-size:12px; font-weight:bold; color:#FFFFFF; background-image:url(images/ngoaite.jpg); padding-left:50px;" height="35">Tỷ giá ngoại tệ</td>
  </tr>
  <tr>
  	<td style="background-image:url(images/tygia2.jpg)" align="center">
		<table width="90%" cellpadding="0" cellspacing="0" border="0" >
			
			<tr class="bgwhite">
    <td class="tiente1" >USD</td>

    <td class="tiente2"><script>document.write(vCosts[0]);</script></td>
  </tr>
  <tr class="bgwhite">
    <td class="tiente3">EUR</td>
    <td class="tiente4"><script>document.write(vCosts[10]);</script></td>
  </tr>
  <tr class="bgwhite">

    <td class="tiente1">GBP</td>
    <td class="tiente2"><script>document.write(vCosts[1]);</script></td>
  </tr>
  <tr class="bgwhite">
    <td class="tiente3">HKD</td>
    <td class="tiente4"><script>document.write(vCosts[2]);</script></td>
  </tr>

  <tr class="bgwhite">
    <td class="tiente1">CHF</td>
    <td class="tiente2"><script>document.write(vCosts[4]);</script></td>
  </tr>
  
  <tr class="bgwhite">
    <td class="tiente3">JPY</td>
    <td class="tiente4"><script>document.write(vCosts[6]);</script></td>
  </tr>
  <tr class="bgwhite">
    <td class="tiente1">FRF</td>
    <td class="tiente2"><script>document.write(vCosts[3]);</script></td>
  </tr>
  <tr class="bgwhite">
    <td class="tiente3">AUD</td>

    <td class="tiente4"><script>document.write(vCosts[7]);</script></td>
  </tr>
  <tr class="bgwhite">
    <td class="tiente1">CAD</td>
    <td class="tiente2"><script>document.write(vCosts[8]);</script></td>
  </tr>
  <tr class="bgwhite">

    <td class="tiente3">SGD</td>
    <td class="tiente4"><script>document.write(vCosts[9]);</script></td>
  </tr>
  <tr class="bgwhite">
    <td class="tiente1">DEM</td>
    <td class="tiente2"><script>document.write(vCosts[5]);</script></td>
  </tr>

  <tr class="bgwhite">
    <td class="tiente3">NZD</td>
    <td class="tiente4"><script>document.write(vCosts[11]);</script></td>
  </tr>
  <!--<tr class="bgwhite">
    <td class="tiente1">NOK</td>
    <td class="tiente2"><script>document.write(vCosts[12]);</script></td>
  </tr>-->
	<tr>
		<td colspan="2" style="font-family:Tahoma; font-size:10px; color:#999999; text-align:center;">
			Nguồn: Ngân hàng đầu tư và phát triển Việt Nam (BIDV)		</td>
	</tr>		
		</table>	</td>
  </tr>
  <tr>
  	<td style="background-image:url(images/tygia3.jpg); background-repeat:no-repeat;" height="11">	</td>
  </tr>
</table>

<div>
							
  							<table width="100%" cellpadding="0" cellspacing="0">
  <tr>
  	<td style=" font-family:Tahoma; font-size:12px; font-weight:bold; color:#FFFFFF; background-image:url(images/giavang.jpg); padding-left:50px;" height="35">Giá vàng SJC </td>
  </tr>
  <tr>
  	<td style="background-image:url(images/tygia2.jpg)" align="center" >
	
	
	<script language="javascript" src="http://vnexpress.net/Service/Gold_Content.js"></script>
 
	
	<div id="eGold">&nbsp;</div>
	<script language="javascript" type="text/javascript">
		function ShowGoldPrice()
		{
			var vGold;
			vGold = '<div style="width:90%;background-color:#ffffff;" align="center">';
			vGold += '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
			vGold += '<tr>';
			vGold += '<td width="40%" class="tiente3" style="font-family:Tahoma; font-size:11px; color:#000099;">Mua';
			vGold += '</td>';
			vGold += '<td width="60%" align="right" class="tiente4">'+vGoldBuy;
			vGold += '</td>';
			vGold += '</tr>';
			vGold += '<tr>';
			vGold += '<td width="40%" class="tiente3" style="font-family:Tahoma; font-size:11px; color:#000099;">Bán';
			vGold += '</td>';
			vGold += '<td width="60%" align="right" class="tiente4">'+vGoldSell;
			vGold += '</td>';
			vGold += '</tr>';
			vGold += '<tr>';
			vGold += '<td colspan=2 style="font-family:Tahoma; font-size:10px; color:#999999; text-align:center;">Nguồn: SJC';
			vGold += '</td>';
			vGold += '</tr>';
			vGold += '</table>';
			vGold += '</div>';
			document.getElementById("eGold").innerHTML = vGold;
		}
		ShowGoldPrice();

	</script>	</td>
  </tr>
  <tr>
  	<td style="background-image:url(images/tygia3.jpg); background-repeat:no-repeat;" height="11">	</td>
  </tr>
</table>
							</div>						</td>
					</tr>
					</table>				</td>
				<td rowspan="2" valign="top" >
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td>
								<table width="100%" cellpadding="0" cellspacing="0" border="0">
									<tr>
										<td style="background-image:url(images/search1.jpg); background-repeat:no-repeat" width="16" height="35"></td>
										<td style="background-image:url(images/search2.jpg); background-repeat:repeat-x; font-family:Tahoma; font-size:12px; font-weight:bold; text-transform:uppercase; text-align:center; color:#FFFFFF">Tìm kiếm thông tin nhà đất</td>
										<td style="background-image:url(images/search3.jpg); background-repeat:no-repeat" width="15" height="35"></td>
									</tr>
								</table>							</td> 
						</tr>
						<tr>
							<td height="30" align="right" valign="top" style="background-image:url(images/search4.jpg); background-repeat:repeat-y; font-family:Tahoma; font-size:12px; color:#333333;">
							<form action="index.php" method="get" name="frmsearch" id="frmsearch" onSubmit="return true">
								<table width="100%" cellpadding="0" cellspacing="0" border="0">
									<tr>
										<td width="50%" align="right" valign="top">
											<table width="90%" cellpadding="0" cellspacing="0" border="0">											
											  <tr>
     				                            	<td align="right" style="font-weight:bold;">Diện tích : </td>
													<td height="30" colspan="2" style="padding-left:5px;"><select name="dientich" size="1" id="dientich" style="width:100">
														<option value="-1" <?php if($dientich == -1) echo "selected=\"selected\"";?>>Tất cả</option>
														<option value="1" <?php if($dientich == 1) echo "selected=\"selected\"";?>> &lt;= 100 m &sup2;</option>
														<option value="2" <?php if($dientich == 2) echo "selected=\"selected\"";?>> 101 - 150 m &sup2;</option>
														<option value="3" <?php if($dientich == 3) echo "selected=\"selected\"";?>> 151 - 200 m &sup2;</option>
														<option value="4" <?php if($dientich == 4) echo "selected=\"selected\"";?>> 201 - 300 m &sup2;</option>
														<option value="5" <?php if($dientich == 5) echo "selected=\"selected\"";?>> &gt;= 300 m &sup2;</option>
											    </select>												</td>
                               				  </tr>
												<tr>
     				                            	<td align="right" style="font-weight:bold;">Đường rộng : </td>
													<td height="30" colspan="2" style="padding-left:5px;"><select name="duongrong" size="1" id="duongrong" style="width:100">
														<option value="-1" <?php if($duongrong == -1) echo "selected=\"selected\"";?>>Tất cả</option>
														<option value="1" <?php if($duongrong == 1) echo "selected=\"selected\"";?>> &lt;= 10 m</option>
														<option value="2" <?php if($duongrong == 2) echo "selected=\"selected\"";?>> 11 - 15 m</option>
														<option value="3" <?php if($duongrong == 3) echo "selected=\"selected\"";?>> 16 - 20 m</option>
														<option value="4" <?php if($duongrong == 4) echo "selected=\"selected\"";?>> &gt;= 20 m</option>
												  </select>												  </td>
                                				</tr>
												<tr>
     				                            	<td align="right" style="font-weight:bold;">Từ khoá : </td>
													<td height="30" colspan="2" style="padding-left:5px;">
													<input name="keyword" type="text" class="style2" id="keyword" size="16" value="<?php echo $keyword; ?>"  />												  </td>
                                				</tr>
										  </table>									  </td>
										<td valign="top" width="50%">
											<table width="90%" cellpadding="0" cellspacing="0" border="0">
												<tr>
     				                            	<td align="right" style="font-weight:bold;">Hướng : </td>
													<td height="30" colspan="2" style="padding-left:5px;"><select name="huong" size="1" id="huong" style="width:100">
														<option value="-1">Tất cả</option>
														<?php
															include_once("class/chuong.php");
															global $objhuong;
															$array = $objhuong->Doc_danh_sach();
															if(is_array($array))
															{
																foreach ($array as $objhuong)
																{
														?>
																<option value="<?php echo $objhuong->id; ?>"  <?php if($huong == $objhuong->id) echo "selected=\"selected\"";?>><?php echo $objhuong->title; ?></option>
														<?php
																}
															}
														?>
													  </select>												  </td>
                                				</tr>
												<tr>
     				                            	<td align="right" style="font-weight:bold;">Giá bán : </td>
													<td height="30" colspan="2" style="padding-left:5px;"><select name="gia" size="1" id="gia" style="width:100">
														<option value="-1" <?php if($gia == -1) echo "selected=\"selected\"";?>>Tất cả</option>
														<option value="1" <?php if($gia == 1) echo "selected=\"selected\"";?>> Dưới 500 triệu</option>
														<option value="2" <?php if($gia == 2) echo "selected=\"selected\"";?>> Trên 500 triệu - 1 tỷ</option>
														<option value="3" <?php if($gia == 3) echo "selected=\"selected\"";?>> Trên 1 tỷ - 1,5 tỷ</option>
														<option value="4" <?php if($gia == 4) echo "selected=\"selected\"";?>> Trên 1,5 tỷ - 2 tỷ</option>
														<option value="5" <?php if($gia == 5) echo "selected=\"selected\"";?>> Trên 2 tỷ - 3 tỷ</option>
														<option value="6" <?php if($gia == 6) echo "selected=\"selected\"";?>> Trên 3 tỷ - 5 tỷ</option>
														<option value="7" <?php if($gia == 7) echo "selected=\"selected\"";?>> Trên 5 tỷ</option>
													  </select>												  </td>
                                				</tr>
												<tr>
     				                            	
													<td height="30" colspan="3" align="right" style="padding-right:77px;">
													<img src="images/search.jpg" onClick="document.frmsearch.submit()"/>
													<input name="module" type="hidden" id="module" value="com_searchproduct"></td>
                                				</tr>
										  </table>										</td>
									</tr>
							  </table>
							  </form>						  </td>
						</tr>
						<tr>
							<td style="background-image:url(images/search5.jpg); background-repeat:no-repeat" height="9"></td>
						</tr>
						<tr>
							<td id="mainbody">
							<?php
								loadmainbody();
							?>							</td>
						</tr>
				  </table>				</td>
				<td width="203" valign="top">
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
						<!--<tr>
								<td style="background-image:url(images/bg_menuleft.jpg); font-family:Tahoma; font-size:12px; color:#FFFFFF; font-weight:bold; padding-left:50px;" height="35">Quảng cáo</td>
						</tr>-->
						<!--<tr>
							<td style="background-image:url(images/dangnhap2.jpg); background-repeat:repeat-y;">
							<?php
								//loadmodule("mod_adv","","","");
							?>							</td>
						</tr>-->
						<!--<tr><td style="background-image:url(images/dangnhap3.jpg)" height="9">
						</td>
						</tr>-->
						
						<!--<tr><td height="5"></td></tr>-->
						<tr>
								<td style="background-image:url(images/tintuc.jpg); font-family:Tahoma; font-size:12px; color:#FFFFFF; font-weight:bold; padding-left:50px;" height="35">Tin tức bất động sản</td>
						</tr>
						<tr>
							<td id="mod_news" style="background-image:url(images/dangnhap2.jpg); background-repeat:repeat-y;">
							<?php
								include_once("class/ccategory.php");
								global $objcategory;
								$array = $objcategory->Fill("tag like '%tintuc%'");
								$idcat = $array[0]->id;
								loadmodule("mod_news","","","catid=$idcat");
							?>		
							<div align="right" style="padding-right:5px;"> <a href="?module=com_content&task=blogcategory&id=1" class="readmore">Xem tiếp ...</a></div>					
							</td>
						</tr>
						<tr><td style="background-image:url(images/dangnhap3.jpg)" height="9">
						</td>
						</tr>
						<tr>
								<td style="background-image:url(images/phapluat.jpg); font-family:Tahoma; font-size:12px; color:#FFFFFF; font-weight:bold; padding-left:50px;" height="35">Văn bản pháp luật</td>
						</tr>
						<tr>
							<td id="mod_news" style="background-image:url(images/dangnhap2.jpg); background-repeat:repeat-y;">
							<?php
								include_once("class/ccategory.php");
								global $objcategory;
								$array = $objcategory->Fill("tag like '%phapluat%'");
								$idcat = $array[0]->id;
								loadmodule("mod_news","","","catid=$idcat");
							?>
							<div align="right" style="padding-right:5px;"> <a href="?module=com_content&task=blogcategory&id=2" class="readmore">Xem tiếp ...</a></div>
														</td>
						</tr>
						<tr><td style="background-image:url(images/dangnhap3.jpg)" height="9">
						</td>
						</tr>	
						
						<tr>
							<td style="text-align:center">
							<a href="http://www.tcvg.hochiminhcity.gov.vn/bang_gia_dat_tphcm" target="_blank"><img src="images/banggia.jpg" border="0"></a>
							</td>
						</tr>
						<tr>
							<td height="5"></td>
						</tr>
						
					</table>				</td>
			</tr>
			<tr>
			  <td valign="bottom">
			  <table width="100%" cellpadding="0" cellspacing="0" border="0">
			  	<tr>
								<td style="background-image:url(images/thongke.jpg); font-family:Tahoma; font-size:12px; color:#FFFFFF; font-weight:bold; padding-left:50px;" height="35">Thống kê</td>
						</tr>
					<tr>
							<td id="mod_news" style="background-image:url(images/dangnhap2.jpg); background-repeat:repeat-y; font-family:Tahoma; font-size:11px; color:#333333; padding-left:10px; padding-top:5px;">
							<?php
								loadmodule("mod_counter","","","");
							?>							</td>
						</tr>
						<tr><td style="background-image:url(images/dangnhap3.jpg)" height="9">
						</td>
						</tr>	
			  </table>
			  </td>
		  </tr>
		</table>
	</td>
  </tr>
  <tr>
  	<td style="background-image:url(images/bottom.jpg); background-repeat:repeat-x" height="69" class="pn">Copyright&copy; Ngoc Chau<br>
Add: 8 - D4a Street - Phuoc Long B Ward - District 9 - Ho Chi Minh City<br>
Phone: 08.2437071 - 0903 880 333 - Email: vophuongphi@gmail.com<br>
<a href="http://www.phannguyenit.com" target="_blank">Developed by Phan Nguyen Infomatics</a>
	</td>
  </tr>
</table>
<?php mysql_close($csdl->ketnoi); ?>
</body>
</html>
